package com.yy.permissions_general;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.net.InetAddress;
import java.net.UnknownHostException;

@Slf4j
@EnableTransactionManagement
@SpringBootApplication
@ComponentScan("com.yy.permissions_general.*")
@MapperScan(basePackages = {"com.yy.permissions_general.module.*.*.*.mapper","com.yy.permissions_general.module.*.*.mapper","com.yy.permissions_general.module.*.mapper"})
public class PermissionsGeneralApplication {
    public static void main(String[] args) {
        SpringApplication.run(PermissionsGeneralApplication.class, args);
        try {
            log.info("\n======================================================\n\t"+
                            "Application is running !!! \n\t"+
                            "Auth: \tyy\n\t"+
                            "Email: \t1287529100@qq.com\n\t"+
                            "Access URLs:\t http://{}:9999/permissions_general/view/index\n\t"+
                            "Extranet URLs:\t http://e3mb8a.natappfree.cc/permissions_general\n"+
                            "======================================================",
                    InetAddress.getLocalHost().getHostAddress()
            );
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
    }


}
